Optimal. Leaf size=64 \[ \frac {a \log (\cos (c+d x))}{(a+b)^2 d}-\frac {a \log \left (a+b \sin ^2(c+d x)\right )}{2 (a+b)^2 d}+\frac {\sec ^2(c+d x)}{2 (a+b) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3273, 78}
\begin {gather*} \frac {\sec ^2(c+d x)}{2 d (a+b)}-\frac {a \log \left (a+b \sin ^2(c+d x)\right )}{2 d (a+b)^2}+\frac {a \log (\cos (c+d x))}{d (a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 3273
Rubi steps
\begin {align*} \int \frac {\tan ^3(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {x}{(1-x)^2 (a+b x)} \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{(a+b) (-1+x)^2}+\frac {a}{(a+b)^2 (-1+x)}-\frac {a b}{(a+b)^2 (a+b x)}\right ) \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=\frac {a \log (\cos (c+d x))}{(a+b)^2 d}-\frac {a \log \left (a+b \sin ^2(c+d x)\right )}{2 (a+b)^2 d}+\frac {\sec ^2(c+d x)}{2 (a+b) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 52, normalized size = 0.81 \begin {gather*} \frac {a \left (2 \log (\cos (c+d x))-\log \left (a+b \sin ^2(c+d x)\right )\right )+(a+b) \sec ^2(c+d x)}{2 (a+b)^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.36, size = 58, normalized size = 0.91
method | result | size |
derivativedivides | \(\frac {-\frac {a \ln \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}{2 \left (a +b \right )^{2}}+\frac {a \ln \left (\cos \left (d x +c \right )\right )}{\left (a +b \right )^{2}}+\frac {1}{2 \left (a +b \right ) \cos \left (d x +c \right )^{2}}}{d}\) | \(58\) |
default | \(\frac {-\frac {a \ln \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}{2 \left (a +b \right )^{2}}+\frac {a \ln \left (\cos \left (d x +c \right )\right )}{\left (a +b \right )^{2}}+\frac {1}{2 \left (a +b \right ) \cos \left (d x +c \right )^{2}}}{d}\) | \(58\) |
risch | \(\frac {2 \,{\mathrm e}^{2 i \left (d x +c \right )}}{d \left (a +b \right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d \left (a^{2}+2 a b +b^{2}\right )}-\frac {a \ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right )}{2 d \left (a^{2}+2 a b +b^{2}\right )}\) | \(114\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 82, normalized size = 1.28 \begin {gather*} -\frac {\frac {a \log \left (b \sin \left (d x + c\right )^{2} + a\right )}{a^{2} + 2 \, a b + b^{2}} - \frac {a \log \left (\sin \left (d x + c\right )^{2} - 1\right )}{a^{2} + 2 \, a b + b^{2}} + \frac {1}{{\left (a + b\right )} \sin \left (d x + c\right )^{2} - a - b}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 78, normalized size = 1.22 \begin {gather*} -\frac {a \cos \left (d x + c\right )^{2} \log \left (-b \cos \left (d x + c\right )^{2} + a + b\right ) - 2 \, a \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) - a - b}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan ^{3}{\left (c + d x \right )}}{a + b \sin ^{2}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 234 vs.
\(2 (60) = 120\).
time = 0.76, size = 234, normalized size = 3.66 \begin {gather*} -\frac {\frac {a \log \left (a - \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {4 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{a^{2} + 2 \, a b + b^{2}} - \frac {2 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{a^{2} + 2 \, a b + b^{2}} + \frac {3 \, a + \frac {10 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {4 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{{\left (a^{2} + 2 \, a b + b^{2}\right )} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 14.28, size = 52, normalized size = 0.81 \begin {gather*} -\frac {a\,\left (\frac {\ln \left (\left (a+b\right )\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\right )}{2}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{2}\right )-\frac {b\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2}}{d\,{\left (a+b\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________